﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using SMS.Entities;
using SMS.DAL;

namespace SMS.Web.Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "TrackingService" in code, svc and config file together.
    public class TrackingService : ITrackingService
    {
        public void DoWork()
        {
        }

       

        public List<SaleHistory> LoadSaleHistoryList(string UserName, int SaleID, out SMSException serviceError)
        {
            try
            {
                serviceError = null;
                return new TrackingDA().GetSaleHistory(UserName,SaleID);

            }
            catch (Exception ex)
            {
                serviceError = new Entities.SMSException(ex);
                return null;
            }

           // throw new NotImplementedException();
        }

        public List<ClsSaleDetail> LoadSaleDetailList(string UserName,int saleID, out SMSException serviceError)
        {
            try
            {
                serviceError = null;
                return new TrackingDA().GetSaleDetails(UserName, saleID);

            }
            catch (Exception ex)
            {
                serviceError = new Entities.SMSException(ex);
                return null;
            }
           // throw new NotImplementedException();
        }
    }
}
